const Mock = require('mockjs')
const path = require('path')
const MockRequire = require('../mock-require')

module.exports = {
  // 订单列表-小程序
  '/orderList/all/1': function() {
    return MockRequire(path.resolve(__dirname, './order-list-1.json')).then(temp => {
      return Mock.mock(temp)
    })
  },
  // 订单列表-U2养车
  '/orderList/all/2': function() {
    return MockRequire(path.resolve(__dirname, './order-list-2.json')).then(temp => {
      return Mock.mock(temp)
    })
  },
  // 订单列表-再营销
  '/orderList/all/3': function() {
    return MockRequire(path.resolve(__dirname, './order-list-3.json')).then(temp => {
      return Mock.mock(temp)
    })
  },
  // 订单列表-小程序
  '/orderList/service/1': function() {
    return MockRequire(path.resolve(__dirname, './order-list-service-1.json')).then(temp => {
      return Mock.mock(temp)
    })
  },
  // 订单列表-U2养车
  '/orderList/service/2': function() {
    return MockRequire(path.resolve(__dirname, './order-list-service-2.json')).then(temp => {
      return Mock.mock(temp)
    })
  },
  // 订单列表-再营销
  '/orderList/service/3': function() {
    return MockRequire(path.resolve(__dirname, './order-list-service-3.json')).then(temp => {
      return Mock.mock(temp)
    })
  },
  // 订单详情
  '/orderDetail': function() {
    return MockRequire(path.resolve(__dirname, './order-detail.json')).then(temp => {
      return Mock.mock(temp)
    })
  },
  // 订单详情
  '/orderServiceDetail': function() {
    return MockRequire(path.resolve(__dirname, './order-service-detail.json')).then(temp => {
      return Mock.mock(temp)
    })
  },
  // 订单退款详情
  '/orderServiceRetuanDetail': function() {
    return MockRequire(path.resolve(__dirname, './order-service-return-detail.json')).then(temp => {
      return Mock.mock(temp)
    })
  },
  // 订单退款审批
  '/orderServiceRetuanSave': function() {
    return MockRequire(path.resolve(__dirname, './order-service-return-save.json')).then(temp => {
      return Mock.mock(temp)
    })
  }
}
